package com.zzxy.springmvc12.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;


    @Controller
    @RequestMapping("test")
    public class TestController {
        @RequestMapping("test3")
        public String test(@RequestParam(required = true, defaultValue = "19", name = "id") int id) {
            System.out.println("id: " + id);
            return "forward:/stu/register/do";
        }
        @RequestMapping("test4")
        public String test4() {
            return "redirect:/stu/register/do";
        }
    }

